import Vue from 'vue'
import Router from 'vue-router'
import layout from '@/page/layout/layoutNav'
import login from '@/page/login/login'
import list from '@/page/text/list'
import detail from '@/page/text/detail'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'login',
      component: login
    },
    {
      path: '/layout',
      name: 'layout',
      component: layout,
      redirect: '/layout/index',
      children: [
        {path: 'index', component: list}
      ]
    },
    {
      path: '/list',
      component: layout,
      redirect: '/list/index',
      children: [
        {path: 'index', component: list}
      ]
    },
    {
      path: '/detail',
      component: layout,
      redirect: '/detail/index',
      children: [
        {path: 'index', component: detail}
      ]
    }
  ]
})
